from dfa import core, simulator, parser

dfa = core.DFA(name="3820")
dfa.add_state("0")
dfa.add_state("1")
dfa.add_state("2")


dfa.add_transition("0","1", "0", "1")
dfa.add_transition("0","2", "1", "0")
dfa.add_transition("1","2", "0", "0")
dfa.add_transition("1","2", "1", "1")
dfa.add_transition("2","0", "0", "0")
dfa.add_transition("2","0", "1", "1")

dfa.set_init("0")
sim = simulator.Simulator(dfa)
print sim.cycle("00000000000000")
#print parser.write_dot(dfa)
